<template>
  <el-input
      v-model="value"
      :disabled="disabled"
      :type="field.format.type"
      :maxlength="field.format.maxlength"
      :clearable="!field.not_null"
      show-word-limit
      :rows="1"
  />
</template>

<script setup lang="ts">
import {computed} from "vue";
import type {DaoTypes} from "../../../types/tool/dao.types.ts";
import type {MetaField} from "../../../types/tool/meta.types.ts";

const props = defineProps<{
  modelValue: any,
  disabled: boolean,
  field: MetaField
  db: DaoTypes,
}>();
const emits = defineEmits(['update:modelValue'])
const value = computed({
  get: () => props.modelValue,
  set: (v) => emits('update:modelValue', v || null)
})

</script>

<style scoped>

</style>